<div class="row">
  <div class="col-sm-12">
    <div class="">
      <div class="col-sm-6">
        <div class="row">
          <div id="ibox-search" class="ibox float-e-margins" style="margin-bottom: 0;">
            <div class="ibox-title">
              <h5>请输入查询条件</h5>
              <div ibox-tools="" class="ng-scope">
                <div  dropdown="" class="ibox-tools dropdown">
                  <a  ng-click="showhide()"> <i class="fa fa-chevron-up"></i></a>
                </div>
              </div>
            </div>
            <div id="search-content" class="ibox-content">
              <div class="row">
                <div class="col-sm-4">
                  <div class="form-group col-sm-12">
                    <label for="image_patientname" class="control-label">患者姓名</label>
                    <input type="text" id="image_patientname" class="form-control" data-placement="top"
                           data-original-title="" placeholder="" ng-model="search.name">
                  </div>
                </div>
                <div class="col-sm-4">
                  <div class="form-group">
                    <label for="image_patientname" class="control-label">病种</label>
                    <input type="text" id="image_patient2name" class="form-control" data-placement="top"
                           data-original-title="" placeholder="" ng-model="search.part">
                  </div>
                </div>
                <div class="col-md-4">
                  <div class="form-group">
                    <label for="image_patientname" class="control-label">就诊时间</label>
                    <input type="text"  class="form-control" data-placement="top"
                           data-original-title="" placeholder="" ng-model="search.time">
                  </div>
                </div>
              </div>

            </div>
          </div>
        </div>
        <div class="row">
          <div class="col-sm-12 ibox float-e-margins" style="margin-bottom: 0;">
            <div class="ibox-title">
              <h5><strong>上午压模清单</strong></h5>
              <div ibox-tools></div>
            </div>
            <div class="ibox-content" style="padding: 0;">
              <table datatable="ng" dt-options="dtOptions"  class="table table-striped table-bordered table-hover dataTables-example" style="margin: 0;">
                <tbody>
                <tr ng-repeat="model in modelList | filter:{time:search.time}">
                  <td style="width: 15%;text-align: center;vertical-align: middle;  ">{{ model.time }}</td>
                  <td style="width: 85%;padding: 0;">
                    <table style="width: 100%;">
                      <tr>
                        <td ng-repeat="patient in model.patients |filter:{name:search.name,part:search.part}" style="width: 33%;">
                          <div class="col-sm-12">
                            <div class="feed-element"  style="padding-right: 0;padding-bottom:0;margin: 0;">
                                <div class="col-sm-4" style="margin:5px 0px;padding: 0;width: 60px;">
                                <a>
                                  <img alt="image" class="img-square" src="{{patient.headpic}}" ng-click="showModelForm(patient.id)">
                                </a>
                              </div>
                                <div class="col-sm-7 media-body" style="margin-top: 10px;padding-left: 5px;">
                                  <a class="btn btn-small  btn-rounded" style="border: none;font-size: 14px;"><strong>{{patient.name}}</strong></a><br>
                                  <a class="btn btn-xs btn-outline btn-primary" style="font-size: 12px;">{{patient.part}}</a>
                                  <a class="btn btn-xs  btn-primary"  ng-class="{true:'btn-outline'}[patient.status=='已完成']">{{patient.status}}</a>
                                 <!-- <div class="actions" style="margin-top: 1px;">
                                    <a class="btn btn-xs btn-white" ng-click="finish()">操作</a>
                                  </div>-->
                                </div>
                              </div>
                          </div>
                        </td>
                      </tr>
                    </table>

                  </td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div class="row">
          <div id="ibox-pm" class="col-sm-12 ibox float-e-margins" style="margin-bottom: 0;">
            <div class="ibox-title">
              <h5><strong>下午压模清单</strong></h5>
              <div ibox-tools></div>
            </div>
            <div id="pm-content" class="ibox-content" style="padding: 0;">
              <table datatable="ng" dt-options="dtOptions"  class="table table-striped table-bordered table-hover dataTables-example" style="margin: 0;">
                <tbody>
                <tr ng-repeat="model in modelList | filter:{time:search.time}">
                  <td style="width: 15%;text-align: center;vertical-align: middle;  ">{{ model.time }}</td>
                  <td style="width: 85%;padding: 0;">
                    <table style="width: 100%;">
                      <tr>
                        <td ng-repeat="patient in model.patients |filter:{name:search.name,part:search.part}" style="width: 33%;">
                          <div class="col-sm-12">
                            <div class="feed-element"  style="padding: 0;margin: 0;">
                              <div class="col-sm-4" style="margin:5px 0px;padding: 0;width: 60px;">
                                <a>
                                  <img alt="image" class="img-square" src="{{patient.headpic}}" ng-click="showModelForm(patient.id)">
                                </a>
                              </div>
                              <div class="col-sm-7 media-body" style="margin-top: 10px;padding-left: 5px;">
                                <a class="btn btn-xs btn-white btn-rounded" style="border: none;font-size: 14px;"><strong>{{patient.name}}</strong></a><br>
                                <a class="btn btn-xs btn-outline btn-primary" style="font-size: 12px;">{{patient.part}}</a>
                                <a class="btn btn-xs  btn-primary">{{patient.status}}</a>
                                <!-- <div class="actions" style="margin-top: 1px;">
                                   <a class="btn btn-xs btn-white" ng-click="finish()">操作</a>
                                 </div>-->
                              </div>
                          </div>
                          </div>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <div class="row" id ='noCheck'>
          <div class="col-sm-12 ibox float-e-margins" style="padding: 0;">
            <div class="ibox-title">
              <h5><strong>未压模的名单</strong></h5>
              <div ibox-tools="" class="ng-scope">
                <div dropdown="" class="ibox-tools dropdown">
                  <a ng-click="showhide()"> <i class="fa fa-chevron-up"></i></a>
                </div>
              </div>
            </div>
            <div class="ibox-content">
              <table style="width: 100%;">
                <tr>
                  <td ng-repeat="patient in modelList[0].patients track by $index" style="float: left;">
                    <div class="col-sm-12">
                      <div class="text-center">
                        <div class="feed-element">
                          <img alt="image" class="img-square" src="{{patient.headpic}}"
                               style="width: 50px;height: 50px;margin: 0 auto;"  ng-click="showModelForm(patient.id)">
                        </div>
                        <div class="m-t-xs font-bold">{{patient.name}}-{{patient.part}}</div>
                        <div class="m-t-xs font-bold"></div>
                      </div>
                     </div>
                  </td>
                </tr>
              </table>
            </div>
          </div>
        </div>
      </div>
      <div class="col-sm-6">
        <div style="margin: 0 auto;">
            <div class="wrapper wrapper-content" style="height: 100%;padding-top:0px;padding-bottom: 0px;">
              <div print-section class="ibox-content p-xl" style="height: inherit;">
                <div class="row">
                  <div class="col-sm-12">
                    <button id="finish" class="btn btn-primary" ng-click="finish()"><i class="fa fa-check "></i> 操作 </button>
                  </div>
<!--                  <div class="col-sm-6" style="margin-top:0mm;">
                    <img height="80px;width:150px;" src="assets/images/validate/logo.png">
                  </div>-->
                </div>

                <div class="row col-sm-12" style="margin:10mm auto; text-align: center;">
                  <h1 >处方笺</h1>
                </div>

                <div class="row">
                  <table >
                    <tr style="height: 15mm">
                      <td><span >门诊/住院病例号</span></td>
                      <td >
                        <div class="col-sm-7 clear-padding ">
                          <input type="text" name="caseNum" class="valdiateInput"style="text-align: center;"
                                 ng-model="modelForm.caseNum"
                                 />
                        </div>
                      </td>
                      <td>病室/病区</td>
                      <td>  <div class="col-sm-7 clear-padding " ng-class="{'has-success':!myForm.part.$pristine && myForm.part.$valid,'has-error':
                (!myForm.part.$pristine || myForm.part.$touched) && myForm.part.$invalid }">
                        <input type="text" name="name" class="valdiateInput"
                               ng-model="modelForm.illnessRoom"
                               style="text-align: center;"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>
                        <div class="help-block" ng-messages="myForm.part.$error" ng-if="myForm.part.$touched">
                          <p ng-message="minlength">用户名最小长度为{{minlength}}</p >
                          <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p >
                          <p ng-message="required">计划系统必填</p >
                        </div>
                      </div></td>
                      <td>床位号</td>
                      <td> <div class="col-sm-7 clear-padding " ng-class="{'has-success':!myForm.part.$pristine && myForm.part.$valid,'has-error':
                (!myForm.part.$pristine || myForm.part.$touched) && myForm.part.$invalid }">
                        <input type="text" name="name" class="valdiateInput"
                               ng-model="modelForm.bedNum"
                               style="text-align: center;"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>
                        <div class="help-block" ng-messages="myForm.part.$error" ng-if="myForm.part.$touched">
                          <p ng-message="minlength">用户名最小长度为{{minlength}}</p >
                          <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p >
                          <p ng-message="required">计划系统必填</p >
                        </div>
                      </div></td>
                    </tr >
                    <tr style="height: 15mm">
                      <td><span style="">姓名</span></td>

                      <td>
                        <div class="col-sm-7 clear-padding " ng-class="{'has-success':!myForm.part.$pristine && myForm.part.$valid,'has-error':
                (!myForm.part.$pristine || myForm.part.$touched) && myForm.part.$invalid }">
                          <input type="text" name="name" class="valdiateInput"
                                 ng-model="modelForm.name"
                                 style="text-align: center;"
                                 ng-minlength="{{setting.patientname.minlength}}"
                                 ng-maxlength="{{setting.patientname.maxlength}}"
                                 required/>
                          <div class="help-block" ng-messages="myForm.part.$error" ng-if="myForm.part.$touched">
                            <p ng-message="minlength">用户名最小长度为{{minlength}}</p >
                            <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p >
                            <p ng-message="required">计划系统必填</p >
                          </div>
                        </div>
                      </td>
                      <td>性别</td>
                      <td>  <div class="col-sm-7 clear-padding " ng-class="{'has-success':!myForm.part.$pristine && myForm.part.$valid,'has-error':
                (!myForm.part.$pristine || myForm.part.$touched) && myForm.part.$invalid }">
                        <input type="text" name="name" class="valdiateInput"
                               ng-model="modelForm.gender"
                               style="text-align: center;"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>
                        <div class="help-block" ng-messages="myForm.part.$error" ng-if="myForm.part.$touched">
                          <p ng-message="minlength">用户名最小长度为{{minlength}}</p >
                          <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p >
                          <p ng-message="required">计划系统必填</p >
                        </div>
                      </div></td>
                      <td>年龄</td>
                      <td> <div class="col-sm-7 clear-padding " ng-class="{'has-success':!myForm.part.$pristine && myForm.part.$valid,'has-error':
                (!myForm.part.$pristine || myForm.part.$touched) && myForm.part.$invalid }">
                        <input type="text" name="name" class="valdiateInput"
                               ng-model="modelForm.age"
                               style="text-align: center;"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>
                        <div class="help-block" ng-messages="myForm.part.$error" ng-if="myForm.part.$touched">
                          <p ng-message="minlength">用户名最小长度为{{minlength}}</p >
                          <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p >
                          <p ng-message="required">计划系统必填</p >
                        </div>
                      </div></td>
                    </tr>
                    <tr style="height: 15mm">
                      <td><span style="">开具日期</span></td>
                      <td colspan="3">
                        <input type="text" name="name" class="valdiateInput"style="width: 20mm;"
                               ng-model="modelForm.year"
                               style="text-align: center"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>年
                        <input type="text" name="name" class="valdiateInput"style="width: 15mm;"
                               ng-model="modelForm.month"
                               style="text-align: center;"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>月
                        <input type="text" name="name" class="valdiateInput"style="width: 15mm;"
                               ng-model="modelForm.day"
                               style="text-align: center;"
                               ng-minlength="{{setting.patientname.minlength}}"
                               ng-maxlength="{{setting.patientname.maxlength}}"
                               required/>日
                      </td>

                      <td>费别</td>
                      <td>
                        <div class="col-sm-7 clear-padding " ng-class="{'has-success':!myForm.part.$pristine && myForm.part.$valid,'has-error':
                (!myForm.part.$pristine || myForm.part.$touched) && myForm.part.$invalid }">
                          <input type="text" name="name" class="valdiateInput"
                                 ng-model="modelForm.payType"
                                 style="text-align: center;"
                                 ng-minlength="{{setting.patientname.minlength}}"
                                 ng-maxlength="{{setting.patientname.maxlength}}"
                                 required/>
                          <div class="help-block" ng-messages="myForm.part.$error" ng-if="myForm.part.$touched">
                            <p ng-message="minlength">用户名最小长度为{{minlength}}</p >
                            <p ng-message="maxlength">用户名最大长度为{{maxlength}}</p >
                            <p ng-message="required">计划系统必填</p >
                          </div>
                        </div>
                      </td>

                    </tr>
                    <tr style="height: 15mm">
                      <td><span style="">临床诊断</span></td>
                      <td colspan="5"> <input type="text" name="name" class="valdiateInput"style="width: 149mm"
                                              ng-model="modelForm.clinical" style="text-align: center;"
                                              ng-minlength="{{setting.patientname.minlength}}"
                                              ng-maxlength="{{setting.patientname.maxlength}}"
                                              required/></td>

                    </tr>
                    <tr style="height: 5mm;position: relative;">
                      <td><span style="font-weight: 600">R.</span></td>
                    </tr>
                    <tr >
                      <td colspan="6"><hr style="height:1px;border:none;border-top:2px ridge darkslategray; width: 100%" /></td>
                    </tr>
                    <tr>
                      <td colspan="6">
                        <!--<textarea style="height: 80mm;width: 100%;border: 0px;"></textarea>-->
<!--                        <select ng-model="modelType" class="form-control"
                                required>
                          <option value="" selected="selected">&#45;&#45;请选择&#45;&#45;</option>
                          <option value="模具" >模具</option>
                          <option value="组织补偿物" >组织补偿物</option>
                          <option value="合金挡铅" >合金挡铅</option>
                        </select>
                        <div ng-show="modelType=='模具'" >
                          <div style="margin-top: 5mm">
                            <div class="col-sm-4"style="padding-left: 0;margin: 0;">
                              <select ng-model="modelSelect.modelPart" class="form-control "
                                      required>
                                <option value="" selected="selected">&#45;&#45;部件&#45;&#45;</option>
                                <option value="头部" >头部</option>
                                <option value="颈肩部" >颈肩部</option>
                                <option value="胸部" >胸部</option>
                              </select>
                            </div>
                            <div class="col-sm-4">
                              <select ng-model="modelSelect.modelAttachment" class="form-control "
                                      required>
                                <option value="" selected="selected">&#45;&#45;附件&#45;&#45;</option>
                                <option value="NTX">NTX</option>
                                <option value="口塞" >口塞</option>
                              </select>
                            </div>
                            <div class="col-sm-4"style="padding-right: 0;margin: 0;">
                              <select ng-model="modelSelect.pattern" class="form-control"
                                      required>
                                <option value="" selected="selected">&#45;&#45;模具&#45;&#45;</option>
                                <option value="仰卧" >仰卧</option>
                                <option value="俯卧" >俯卧</option>
                                <option value="保乳专用架" >保乳专用架</option>
                              </select>
                            </div>
                            <row >
                              &lt;!&ndash;<div class="col-sm-2"style="margin-top: 3mm">补充说明</div>&ndash;&gt;
                              <div class="col-sm-2 " style="margin-top: 3mm">
                                <lable class="control-label">补充说明</lable>
                              </div>
                              <div class="col-sm-10"style="padding-right: 0; margin-top: 3mm;">
                                <textarea class="form-control"ng-model="modelSelect.textarea"></textarea>
                              </div>

                            </row>
                            <row>
                              <button class="btn btn-primary pull-right" ng-click="addModelMessage(1)" style="margin-top: 3mm">
                                保存
                              </button>
                            </row>
                          </div>


                        </div>
                        <div ng-show="modelType=='组织补偿物'">
                          <div class="col-sm-12" style="padding: 0; margin-top: 3mm">
                            <select ng-model="modelSelect.organize" class="form-control "
                                    required>
                              <option value="" selected="selected">&#45;&#45;请选择&#45;&#45;</option>
                              <option value="1cm 干水" >1cm 干水</option>
                              <option value="2cm 干水" >2cm 干水</option>
                            </select>
                          </div>
                          <row>
                            <button class="btn btn-primary pull-right" ng-click="addModelMessage(2)" style="margin-top: 3mm">
                              保存
                            </button>
                          </row>
                        </div>
                        <div ng-show="modelType=='合金挡铅'" >
                          <div class="col-sm-12" style="padding: 0; margin-top: 3mm">
                            <select ng-model="modelSelect.metal" class="form-control"
                                    required>
                              <option value="" selected="selected">&#45;&#45;请选择&#45;&#45;</option>
                              <option value="X线挡铅" >X线挡铅</option>
                              <option value="电子线挡铅" >电子线挡铅</option>
                            </select>
                          </div>
                          <row>
                            <button class="btn btn-primary pull-right" ng-click="addModelMessage(3)" style="margin-top: 3mm">
                              保存
                            </button>
                          </row>
                        </div>
                        <table class="table footable table-bordered"data-page-size="8" my-footable style="margin-top: 3mm">
                          <thead>
                          <tr>
                            <th class="col-sm-2">类型</th>
                            <th class="col-sm-8">详情</th>
                            <th class="col-sm-2">操作</th>
                          </tr>
                          </thead>
                          <tbody>
                          <tr ng-repeat="modelSelect in modelSelects track by $index">
                            <td>{{modelSelect.type}}</td>
                            <td>{{modelSelect.detailMessages}}</td>
                            <td><i class="glyphicon glyphicon-remove pull-right mt-sm " ng-click="deleteGroup();" style="margin: 2px 0 0 0; font-size: 16px;"></i></td>
                          </tr>
                          </tbody>

                        </table>-->
                        <div class="col-sm-12">
                          <div class="col-sm-6" style="line-height: 30px;">
                             <lable class=" control-label">组织补偿物</lable>
                          </div>
                          <div class="col-sm-6" style="line-height: 30px;">
                            <lable class=" control-label">1cm 干水</lable>
                          </div>
                          <div class="col-sm-6" style="line-height: 30px;">
                            <lable class=" control-label">合金挡铅</lable>
                          </div>
                          <div class="col-sm-6" style="line-height: 30px;">
                            <lable class=" control-label">X线挡铅</lable>
                          </div>
                        </div>
                      </td>
                    </tr>
                    <tr >
                      <td colspan="6"><hr style="height:1px;border:none;border-top:2px ridge darkslategray; width: 100%" /></td>
                    </tr>

                  </table>
                  <table>
                    <tr style="height: 15mm">
                      <td colspan="2">医师</td>
                      <td><input type="text" name="name" class="valdiateInput"
                                 ng-model="modelForm.doctor1"
                                 style="text-align: center;"
                                 ng-minlength="{{setting.patientname.minlength}}"
                                 ng-maxlength="{{setting.patientname.maxlength}}"
                                 required/></td>
                      <td style="width: 38mm;"></td>
                      <td>金额</td>
                      <td><input type="text" name="name" class="valdiateInput"
                                 ng-model="modelForm.money"
                                 style="text-align: center;"
                                 ng-minlength="{{setting.patientname.minlength}}"
                                 ng-maxlength="{{setting.patientname.maxlength}}"
                                 required/></td></td>
                    </tr>
                    <tr style="height: 15mm">
                      <td colspan="2">药师（审核、校对、发药）</td>
                      <td><input type="text" name="name" class="valdiateInput"
                                 ng-model="modelForm.apochecary"
                                 ng-minlength="{{setting.patientname.minlength}}"
                                 ng-maxlength="{{setting.patientname.maxlength}}"
                                 required/></td>
                      <td></td>
                      <td>药师/士（调配）  </td>
                      <td><input type="text" name="name" class="valdiateInput"
                                 ng-model="modelForm.allocate"
                                 ng-minlength="{{setting.patientname.minlength}}"
                                 ng-maxlength="{{setting.patientname.maxlength}}"
                                 required/></td></td>
                    </tr>
                  </table>
                </div>

              </div>
            </div>
          </div>
      </div>
    </div>
  </div>
</div>
